﻿using QFramework;
using UnityEngine;
using XftWeapon;

namespace Gp.Scripts.Core {
    public class WeaponTrailEffect : MonoBehaviour{
        [SerializeField] private GameObject[] trailEffect;
        // [SerializeField] private TYPE _type;
        [SerializeField] private XWeaponTrail[] xWeaponTrails;

        private void Start() {
            DeactivateTrail();
        }


        public void ActivateTrail() {
            if (trailEffect != null) foreach (var o in trailEffect) o.Show();
            if (xWeaponTrails != null) foreach (var x in xWeaponTrails) x.Activate();
        }

        public void DeactivateTrail() {
            if (trailEffect != null) foreach (var o in trailEffect) o.Hide();
            if (xWeaponTrails != null) foreach (var x in xWeaponTrails) x.Deactivate();
        }


    }
}